package com.snapan.entity;

import java.util.Date;

/**
 * 分享文件实体类
 */
public class ShareFile {
    
    /**
     * 分享ID
     */
    private Long id;
    
    /**
     * 分享者用户ID
     */
    private Long userId;
    
    /**
     * 被分享的文件ID
     */
    private Long fileId;
    
    /**
     * 分享码（唯一标识）
     */
    private String shareCode;
    
    /**
     * 分享标题
     */
    private String shareTitle;
    
    /**
     * 分享描述
     */
    private String shareDescription;
    
    /**
     * 访问密码（可选）
     */
    private String password;
    
    /**
     * 分享状态：0-禁用，1-启用
     */
    private Byte status;
    
    
    /**
     * 过期时间
     */
    private Date expireTime;
    
    /**
     * 创建时间
     */
    private Date createTime;
    
    /**
     * 更新时间
     */
    private Date updateTime;
    
    /**
     * 最后访问时间
     */
    private Date lastAccessTime;
    
    // 关联字段（从UserFile表获取）
    /**
     * 文件名
     */
    private String fileName;
    
    /**
     * 文件大小
     */
    private Long fileSize;
    
    /**
     * 文件类型
     */
    private String fileType;
    
    /**
     * 文件路径
     */
    private String filePath;
    
    /**
     * 是否目录
     */
    private Byte isDirectory;

    private String suffix;

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public ShareFile() {}
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getUserId() {
        return userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
    public Long getFileId() {
        return fileId;
    }
    
    public void setFileId(Long fileId) {
        this.fileId = fileId;
    }
    
    public String getShareCode() {
        return shareCode;
    }
    
    public void setShareCode(String shareCode) {
        this.shareCode = shareCode;
    }
    
    public String getShareTitle() {
        return shareTitle;
    }
    
    public void setShareTitle(String shareTitle) {
        this.shareTitle = shareTitle;
    }
    
    public String getShareDescription() {
        return shareDescription;
    }
    
    public void setShareDescription(String shareDescription) {
        this.shareDescription = shareDescription;
    }
    
    public String getPassword() {
        return password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    public Byte getStatus() {
        return status;
    }
    
    public void setStatus(Byte status) {
        this.status = status;
    }
    
    
    public Date getExpireTime() {
        return expireTime;
    }
    
    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }
    
    public Date getCreateTime() {
        return createTime;
    }
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    
    public Date getUpdateTime() {
        return updateTime;
    }
    
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    
    public Date getLastAccessTime() {
        return lastAccessTime;
    }
    
    public void setLastAccessTime(Date lastAccessTime) {
        this.lastAccessTime = lastAccessTime;
    }
    
    public String getFileName() {
        return fileName;
    }
    
    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
    
    public Long getFileSize() {
        return fileSize;
    }
    
    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }
    
    public String getFileType() {
        return fileType;
    }
    
    public void setFileType(String fileType) {
        this.fileType = fileType;
    }
    
    public String getFilePath() {
        return filePath;
    }
    
    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
    
    public Byte getIsDirectory() {
        return isDirectory;
    }
    
    public void setIsDirectory(Byte isDirectory) {
        this.isDirectory = isDirectory;
    }
    
    @Override
    public String toString() {
        return "ShareFile{" +
                "id=" + id +
                ", userId=" + userId +
                ", fileId=" + fileId +
                ", shareCode='" + shareCode + '\'' +
                ", shareTitle='" + shareTitle + '\'' +
                ", shareDescription='" + shareDescription + '\'' +
                ", password='" + password + '\'' +
                ", status=" + status +
                ", expireTime=" + expireTime +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", lastAccessTime=" + lastAccessTime +
                ", fileName='" + fileName + '\'' +
                ", fileSize=" + fileSize +
                ", fileType='" + fileType + '\'' +
                ", filePath='" + filePath + '\'' +
                ", isDirectory=" + isDirectory +
                '}';
    }
}

